package com.Annotation.service;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.stereotype.Component;

/**
 * @Author yangSen
 * @Date 2021年12月17日 10:36
 */
@Component("bService")
public class BService implements BeanNameAware {


	/**
	 * 注入a
	 */
	@Autowired
	private AService aService;

	public void test() {
		System.out.println(aService);
	}

	@Override
	public void setBeanName(String name) {
		System.out.println("\n\n" + name + "\n\n");
	}
}
